// 日志装饰器
const log = (message: string) => {
	return (target: any, propertyKey: any, descriptor: PropertyDescriptor) => {
		const originalMethod = descriptor.value;
		descriptor.value = function (...args: any[]) {
			console.log(`[${message}] 调用方法：${propertyKey}`);
			const result = originalMethod.apply(this, args);
			console.log(`[${message}] 方法返回值：${JSON.stringify(result)}`);
			return result;
		};
		return descriptor;
	};
};

export { log };
